{% if not session.customer %}

<!--login_form-->
<div class='well well-user'>
<form method='POST' action='/login/?next={{request.get_full_path}}'>
  {% csrf_token %}
  <fieldset>
<label class="text-error">{{login_form.email.errors|striptags}}</label>
<div class="controls controls-row">
  <div class="input-prepend span12">

    <div class="add-on span3">email</div>
      <div></div>
      {{login_form.email}}
    </div> 
 </div>

<label class="text-error">{{login_form.passw.errors|striptags}}</label>
<div class="controls controls-row">
  <div class="input-prepend span12">
    
    <div class="add-on span3">пароль</div>
    <div></div>
    {{login_form.passw}}
  </div>
  
</div>

<span class='help-block'>Войдите, или <a href='/register/'>зарегестрируйтесь</a></span>

{{login_form.other_comp.label}}
{{login_form.other_comp}}


  </fieldset>

<input class='btn' type='submit' value='Войти'>
</form>

</div>
<!--/login_form-->

{% else %}
<!--alredy_logged_in-->
<div class='well well-user'>
  Добро пожаловать:<br>
  <a href='/personal/'>
    {% if session.customer.fio %}
      {{session.customer.fio}}
    {% else  %}
      {{session.customer.email}}
    {% endif %}

    </a>
  <table class="table">

   <tr>
    <td>В вашей <a href='/basket/'>корзине</a> книг:</td>
    <td class='data'>0</td>  
  </tr>

  <tr>
    <td>На сумму:  </td>
    <td class='data'>0.00</td>  
  </tr>

</table>

<a href='/login/?next={{request.get_full_path}}&logout=True'>Выйти</a>

</div>
<!--/alredy_logged_in-->
{% endif %}